﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TFXK.BLL;
using log4net;

public partial class MyControls_TravelLeftControl : System.Web.UI.UserControl
{
     private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
    private static readonly CategoryBLL bllCategory = new CategoryBLL();
    private static readonly NewsBLL bllNews = new NewsBLL();
    int rowCount = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                BindLeftNews();
            }
        }
        catch (Exception ex) {
            log.Error(ex.Message);
        }
    }
    //绑定热门词
    public void BindLeftNews() {
        rptTravelNews.DataSource = bllNews.GetList(10, 1, "lyxx", out rowCount);
        rptTravelNews.DataBind();
    }
}
